Skip to content

chore(deps): standardize monorepo on react 19.x for next.js 16 compatibility#28722

Open
TanmayChaurasia24 wants to merge 4 commits intocalcom:mainfrom
TanmayChaurasia24:chore/react-19-upgrade
Open

chore(deps): standardize monorepo on react 19.x for next.js 16 compatibility#28722
TanmayChaurasia24 wants to merge 4 commits intocalcom:mainfrom
TanmayChaurasia24:chore/react-19-upgrade

Conversation

@TanmayChaurasia24
Copy link
Copy Markdown

Summary

This PR fully standardizes the monorepo's dependency tree onto React 19 (specifically 19.2.4 and @types/react@19.0.0).

We are adopting React 19 universally because Next.js 16 no longer supports React 18. This resolves the fragmented react and react-dom versioning across root resolutions and app workspaces, which was at risk of causing serious hydration mismatches and inconsistent ref forwarding behavior.

Changes:

  • Updated react and react-dom to 19.2.4 inside apps/web/package.json and in top-level definitions.
  • Bumped @types/react and @types/react-dom to 19.0.0 in root resolutions.
  • Documented the React 19 standard in CONTRIBUTING.md to prevent future version drift.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (Dependency updates, refactoring, or tooling improvements)

Checklist

  • Title follows conventional commits: feat(scope): description or chore(deps): description
  • Type check passes cleanly (yarn type-check:ci --force)
  • Diff is focused (addresses only the React versioning constraint)

Fixes #28634
Screenshot 2026-04-03 at 1 54 07 PM

@TanmayChaurasia24 TanmayChaurasia24 requested a review from a team as a code owner April 3, 2026 08:24
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@TanmayChaurasia24 TanmayChaurasia24 marked this pull request as draft April 4, 2026 20:30
@TanmayChaurasia24 TanmayChaurasia24 marked this pull request as ready for review April 10, 2026 11:29
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

This pull request upgrades the monorepo's React version from 18.x to 19.2.4 across configuration files. React and react-dom dependencies are updated to 19.2.4, and TypeScript type definitions are updated to version 19. The root package.json adds explicit resolutions for React packages to standardize versions across the monorepo. CONTRIBUTING.md is updated to document React 19 as the standard for contributors to use.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: standardizing the monorepo to React 19 for Next.js 16 compatibility.
Description check ✅ Passed The description is well-structured, explaining the React 19 upgrade motivation, listing specific changes made, and linking to the resolved issue.
Linked Issues check ✅ Passed All coding objectives from issue #28634 are addressed: React and react-dom upgraded to 19.2.4, @types/react/@types/react-dom updated to 19.0.0, and React 19 standard documented in CONTRIBUTING.md.
Out of Scope Changes check ✅ Passed All changes are focused on React 19 standardization across the monorepo with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
package.json (1)

124-125: Use an exact @types/react-dom resolution for consistency with the rest of the type packages.

@types/react-dom is set to ^19.0.0 while @types/react is pinned to 19.0.0. For consistency and to avoid unexpected version variations when regenerating lock files, pin this to an exact version.

Suggested diff
-    "@types/react-dom": "^19.0.0",
+    "@types/react-dom": "19.0.0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 124 - 125, Change the package.json dependency for
"@types/react-dom" from a caret range to an exact pinned version to match
"@types/react" (i.e., replace "@types/react-dom": "^19.0.0" with an exact
"19.0.0"); update the package.json entry for the "@types/react-dom" dependency
so the version specifier is identical to the "@types/react" entry to prevent
inadvertent semver upgrades.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/package.json`:
- Around line 123-125: Update the `@testing-library/react` dependency in
package.json from the pinned "13.3.0" to a version that supports React 19 (for
example change "@testing-library/react" to "^16.3.0" or a later compatible
release); update the lockfile (npm/yarn/pnpm) and run install to ensure the new
version is resolved and tests still pass, and verify no other test-related deps
require simultaneous upgrades.

---

Nitpick comments:
In `@package.json`:
- Around line 124-125: Change the package.json dependency for "@types/react-dom"
from a caret range to an exact pinned version to match "@types/react" (i.e.,
replace "@types/react-dom": "^19.0.0" with an exact "19.0.0"); update the
package.json entry for the "@types/react-dom" dependency so the version
specifier is identical to the "@types/react" entry to prevent inadvertent semver
upgrades.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75145016-26a7-469c-8f10-d7e0a5dc5021

📥 Commits

Reviewing files that changed from the base of the PR and between f3e07c5 and 4d86013.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • CONTRIBUTING.md
  • apps/web/package.json
  • package.json

Comment thread apps/web/package.json
Comment on lines +123 to +125
"react": "19.2.4",
"react-digit-input": "2.1.0",
"react-dom": "18.2.0",
"react-dom": "19.2.4",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What are the peerDependencies for @testing-library/react@13.3.0, and which @testing-library/react versions officially support React 19?

💡 Result:

Web search failed: Server error: no LLM provider could handle the message


🏁 Script executed:

#!/bin/bash
# Query npm registry for `@testing-library/react` versions and peerDependencies
npm view `@testing-library/react`@13.3.0 peerDependencies --json 2>/dev/null || echo "npm not available, trying alternative"

Repository: calcom/cal.com

Length of output: 108


🌐 Web query:

@testing-library/react 13.3.0 React 19 compatibility

💡 Result:

Web search failed: Server error: no LLM provider could handle the message


🏁 Script executed:

#!/bin/bash
# Check recent `@testing-library/react` versions and their React peer dependencies
npm view `@testing-library/react` versions --json 2>/dev/null | tail -20 && echo "---" && npm view `@testing-library/react`@16.0.1 peerDependencies --json 2>/dev/null

Repository: calcom/cal.com

Length of output: 440


🏁 Script executed:

#!/bin/bash
# Check the latest `@testing-library/react` version (16.3.2)
npm view `@testing-library/react`@16.3.2 peerDependencies --json 2>/dev/null

Repository: calcom/cal.com

Length of output: 251


🏁 Script executed:

#!/bin/bash
# Check version 16.3.0 peer dependencies
npm view `@testing-library/react`@16.3.0 peerDependencies --json 2>/dev/null

Repository: calcom/cal.com

Length of output: 251


Update @testing-library/react to a version supporting React 19.

Line 161 pins @testing-library/react to 13.3.0, which requires React ^18.0.0 and is incompatible with the React 19 upgrade at Lines 123 and 125. Upgrade to version 16.3.0 or later, which explicitly supports both React 18 and React 19.

Suggested fix
-    "@testing-library/react": "13.3.0",
+    "@testing-library/react": "16.3.2",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/package.json` around lines 123 - 125, Update the
`@testing-library/react` dependency in package.json from the pinned "13.3.0" to a
version that supports React 19 (for example change "@testing-library/react" to
"^16.3.0" or a later compatible release); update the lockfile (npm/yarn/pnpm)
and run install to ensure the new version is resolved and tests still pass, and
verify no other test-related deps require simultaneous upgrades.

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

@github-actions github-actions Bot added the Stale label Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React version split — web app pins React 18.2.0 while root resolutions force React 19.2.4

2 participants